// @ts-ignore
/* eslint-disable */
import { api } from "@/utils/api";

/** 获取设备-保养记录数据 POST /equMaintainRecord/get */
export async function equMaintainRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultEquMaintainRecordEntity>;

export async function equMaintainRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultEquMaintainRecordEntity>>;

export async function equMaintainRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultEquMaintainRecordEntity>;

export async function equMaintainRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultEquMaintainRecordEntity>(
      `/app/equMaintainRecord/get`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultEquMaintainRecordEntity>(
    `/app/equMaintainRecord/get`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 处理 POST /equMaintainRecord/handle */
export async function equMaintainRecordHandle(
  body: BIZAPI.EquMaintainRecordHandleReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function equMaintainRecordHandle(
  body: BIZAPI.EquMaintainRecordHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function equMaintainRecordHandle(
  body: BIZAPI.EquMaintainRecordHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function equMaintainRecordHandle(
  body: BIZAPI.EquMaintainRecordHandleReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/equMaintainRecord/handle`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultObject>(`/app/equMaintainRecord/handle`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取设备-保养记录分页数据 POST /equMaintainRecord/page */
export async function equMaintainRecordPage(
  body: BIZAPI.EquMaintainRecordQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageEquMaintainRecordEntity>;

export async function equMaintainRecordPage(
  body: BIZAPI.EquMaintainRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageEquMaintainRecordEntity>>;

export async function equMaintainRecordPage(
  body: BIZAPI.EquMaintainRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageEquMaintainRecordEntity>;

export async function equMaintainRecordPage(
  body: BIZAPI.EquMaintainRecordQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageEquMaintainRecordEntity>(
      `/app/equMaintainRecord/page`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultIPageEquMaintainRecordEntity>(
    `/app/equMaintainRecord/page`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}
